package com.javakc.platform.modules.circle.info.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.javakc.platform.components.base.entity.Base;
import com.javakc.platform.components.validation.group.Insert;
import com.javakc.platform.components.validation.group.Update;
import com.javakc.platform.modules.circle.type.entity.CircleType;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 圈子信息 属性
 */
@Getter
@Setter
@TableName(value = "circle_info")//绑定表名
//                                     实现序列化接口
public class CircleInfo extends Base implements java.io.Serializable{
    /** 圈子标题 */
    @NotBlank(message = "圈子标题不可为空",groups = {Insert.class, Update.class})
    @Length(min = 2,max = 60,message = "圈子标题长度要求在{min}与{max}之间")
    /** 圈子名称 */
    private String title ;
    @Length(max = 900,message = "圈子介绍长度不能超过{max}",groups = {Insert.class, Update.class})
    /** 圈子介绍 */
    private String remarks ;
    /** 圈子分类外键 */
    @NotNull(message = "圈子分类外键不可为空",groups = {Insert.class, Update.class})
    private Integer circleTypeId ;

    /** 封装数据的对象   */
    @TableField(exist = false) /** 不参与数据库操作   */
//
    private CircleType circleType;


}
